package com.cy.cy2025.vm

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.cy.cy2025.activity.AMapTestActivity
import com.cy.cy2025.activity.CameraTestActivity
import com.cy.cy2025.activity.CameraxTestActivity
import com.cy.cy2025.activity.ComposeTestActivity
import com.cy.cy2025.activity.FileIoTestActivity
import com.cy.cy2025.activity.LeftTextFirstLineActivity
import com.cy.cy2025.activity.LiveFlowActivity
import com.cy.cy2025.activity.LocationManagerTestActivity
import com.cy.cy2025.activity.Media3TestActivity
import com.cy.cy2025.activity.PictureActivity
import com.cy.cy2025.activity.RetrofitActivity
import com.cy.cy2025.activity.TestActivity
import com.cy.cy2025.activity.PermissionTestActivity
import com.cy.cy2025.entity.MainItem
import com.cy.cy2025.service.CustomProcessServiceActivity
import com.cy.cy2025.service.TestServiceActivity

class MainVm : ViewModel() {

    private val _dataList = MutableLiveData<List<MainItem>>()
    val dataList: LiveData<List<MainItem>> = _dataList

    fun loadData() {
        _dataList.value = listOf(
            MainItem("临时测试", TestActivity::class.java),
            MainItem("Compose示例", ComposeTestActivity::class.java),
            MainItem("图片选择", PictureActivity::class.java),
            MainItem("Retrofit使用", RetrofitActivity::class.java),
            MainItem("LiveData,stateFlow,sharedFlow区别", LiveFlowActivity::class.java),
            MainItem("同进程service绑定使用", TestServiceActivity::class.java),
            MainItem("独立进程service示例（音乐播放）", CustomProcessServiceActivity::class.java),
            MainItem("本地文件io操作", FileIoTestActivity::class.java),
            MainItem("动态权限获取工具测试", PermissionTestActivity::class.java),
            MainItem("原生定位功能测试", LocationManagerTestActivity::class.java),
            MainItem("Camera测试", CameraTestActivity::class.java),
            MainItem("CameraX测试", CameraxTestActivity::class.java),
            MainItem("高德地图测试", AMapTestActivity::class.java),
            MainItem("左边文本框优先换行", LeftTextFirstLineActivity::class.java),
            MainItem("谷歌media3视频播放器", Media3TestActivity::class.java),
        )
    }
}